<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/8/22
 * Time: 16:52
 */
namespace app\billiards\model;

use think\Model;

class CollectionM extends Model{

    // 设置当前模型对应的完整数据表名称    视频集锦表
    protected $table = 'collection';

    //模型连接数据库
    protected $connection  = 'tq';

    //关联评论表
    public function getComment(){

        return $this->hasMany('CollectionComment','collection_id','id');
    }
}